package com.ai.manager.edu.cms.user.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Component;

import com.ai.dao.edu.cms.user.MenuMapper;
import com.ai.manager.edu.cms.user.MenuManager;
import com.ai.model.edu.cms.backoperator.Menu;
import com.ai.model.edu.cms.backoperator.vo.MenuVO;

@Component("menuManager")
public class MenuManagerImpl implements MenuManager {
    @Resource
    private MenuMapper menuMapper;

    /**
     * Method Name : deleteByPrimaryKey<br>
     * 
     * Description : 这里记述method说明<br>
     * 
     * @param id
     * @return
     * @since
     * 
     */
    @Override
    public int deleteByPrimaryKey(Long id) {
        return 0;
    }

    /**
     * Method Name : insert<br>
     * 
     * Description : 这里记述method说明<br>
     * 
     * @param record
     * @return
     * @since
     * 
     */
    @Override
    public int insert(Menu record) {
        return menuMapper.insert(record);
    }

    /**
     * Method Name : insertSelective<br>
     * 
     * Description : 这里记述method说明<br>
     * 
     * @param record
     * @return
     * @since
     * 
     */
    @Override
    public int insertSelective(Menu record) {
        // TODO Auto-generated method stub
        return 0;
    }

    /**
     * Method Name : selectByPrimaryKey<br>
     * 
     * Description : 这里记述method说明<br>
     * 
     * @param id
     * @return
     * @since
     * 
     */
    @Override
    public MenuVO selectByPrimaryKey(Long id) {
        // TODO Auto-generated method stub
        return menuMapper.selectByPrimaryKey(id);
    }

    /**
     * Method Name : updateByPrimaryKeySelective<br>
     * 
     * Description : 这里记述method说明<br>
     * 
     * @param record
     * @return
     * @since
     * 
     */
    @Override
    public int updateByPrimaryKeySelective(Menu record) {
        // TODO Auto-generated method stub
        return menuMapper.updateByPrimaryKeySelective(record);
    }

    /**
     * Method Name : updateByPrimaryKey<br>
     * 
     * Description : 这里记述method说明<br>
     * 
     * @param record
     * @return
     * @since
     * 
     */
    @Override
    public int updateByPrimaryKey(Menu record) {
        // TODO Auto-generated method stub
        return 0;
    }

    /**
     * Method Name : selectAllMenu<br>
     * 
     * Description : 这里记述method说明<br>
     * 
     * @return
     * @since
     * 
     */
    @Override
    public List<MenuVO> selectAllMenu() {
        return menuMapper.selectAllMenu();
    }

    /**
     * Description ：根据 menuCode查询菜单<br>
     * 
     * cyj
     * 
     * @return
     * @since
     * 
     */
    @Override
    public List<MenuVO> selectByMenuCode(String menuCode) {
        return menuMapper.selectByMenuCode(menuCode);
    }

    /**
     * Description ： 根据菜单ids 查询所有菜单信息<br>
     * 
     * yangwb
     * 
     * @param ids
     * @return
     * @since
     * 
     */
    public List<MenuVO> findMenuVOSByIds(List<Long> ids) {
        return menuMapper.findMenuVOSByIds(ids);
    }

    /**
     * Description ： 查询所有可用的菜单<br>
     * 
     * yangwb
     * 
     * @return
     * @since
     *
     */
    public List<MenuVO> findAllActiveMenuVOs() {
        return menuMapper.findAllActiveMenuVOs();
    }
}